<!--
To change this template, choose Tools | Templates
and open the template in the editor.
-->
<!DOCTYPE html>
<html>
    <head>
        <link rel='stylesheet' type='text/css' href='../css/redmond/jquery-ui-1.8.12.custom.css' />
        <link rel='stylesheet' type='text/css' href='../css/Recuperar.css' />
        <script type='text/javascript' src='../js/jquery-1.5.1.min.js'></script>
        <script type='text/javascript' src='../js/jquery-ui-1.8.12.custom.min.js'></script>
        <title>Recuperar Contaseña :: W-Calendar</title>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <script>
            $(function() {
                CargarCapchas();      
            });
            function CargarCapchas(){
                $.post("../Controlador/GenerarCapchas.php",{},function(data){
                $("#Capcha").html(data);
                $( ".draggable" ).draggable({ revert: true });
                $( "#droppable" ).droppable({
			drop: function( event, ui ) {
				$.post("../Controlador/VerificarCapchas.php",{id:ui.draggable.attr('id')},function(data){
                                   if(data == 1){
                                      // window.locationf="Recuperar2.php";
                                      $("#Capcha").html("Por favor espere");
                                      location.href="http://localhost:1020/Multimedia/Vista/Recuperar2.php";
                                      
                                   }else{
                                       alert("La figura que arrastró no es la correcta, intentelo nuevamente.");
                                       CargarCapchas();
                                }
                      
                                });
                        }
                        
                    });
            });
            }
        </script>
    </head>
    <body>
        <div id="Banner"><table id="BTable" cellspacing="0"><tr>
            <td><img id="Logo" src="../imagenes/wclogo.png" alt="W-Calendar"></td>
            <td id="Texto" >
               Recuperar Contraseña
            </td>

            </tr></table>
        
        </div>
        <div id="Capcha"></div> 
    </body>
</html>
